package com.enjoy.book.dao;

import com.enjoy.book.bean.Member;
import com.enjoy.book.util.DBHelper;
import org.apache.commons.dbutils.handlers.BeanHandler;
import org.apache.commons.dbutils.handlers.BeanListHandler;
import org.apache.commons.dbutils.handlers.ScalarHandler;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * @author 陈俊威
 */
public interface MemberDao {
    public int add(String name,String pwd,double balance,String tel,String idNumber) throws SQLException ;
    public int modify(long id,String name,String pwd,double balance,String tel,String idNumber) throws SQLException;
    public int remove(long id) throws SQLException ;
    public int modifyBalance(String idNumber,double amount) throws SQLException ;
    public int modifyBalance(long id,double amount) throws SQLException;

    public List<Member> getAll() throws SQLException ;
    public Member getById(long id) throws SQLException ;
    public Member getByIdNumber(String idNumber) throws SQLException ;
    public boolean exits(long id) throws SQLException ;

}
